Skip to content

feat: adding svm update tool to rename, state, comment#109

Merged
Hardikl merged 4 commits intomainfrom
hl_svm_ex
Apr 16, 2026
Merged

feat: adding svm update tool to rename, state, comment#109
Hardikl merged 4 commits intomainfrom
hl_svm_ex

Conversation

@Hardikl
Copy link
Copy Markdown
Contributor

@Hardikl Hardikl commented Apr 15, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 15, 2026 11:55
@cla-bot cla-bot Bot added the cla-signed label Apr 15, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an MCP tool for updating ONTAP SVMs (rename/state/comment), plus supporting REST client logic, schema updates, integration coverage, and documentation examples.

Changes:

  • Introduce update_svm tool and server handler, including update payload construction.
  • Add REST client support to PATCH an SVM by resolving its UUID via name lookup.
  • Extend SVM schemas/models (tool + ontap) and add an integration test + docs examples.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tool/tool.go Adds SVMCreate and extends SVM parameters with new_name, state, comment for update semantics.
server/svm.go Switches create to SVMCreate params and adds UpdateSVM handler + newUpdateSVM builder.
server/server.go Registers the new update_svm tool with update annotations.
rest/svm.go Implements UpdateSVM by GETting SVM UUID by name then PATCHing the resource.
ontap/ontap.go Extends ontap.SVM with state and comment fields for PATCH payloads.
integration/test/svm_test.go Adds integration coverage for create/rename/update/delete SVM flows.
docs/examples.md Documents SVM provisioning examples including update with state+comment.
descriptions/descriptions.go Adds tool description text for UpdateSVM.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/svm.go
Comment thread ontap/ontap.go Outdated
Comment thread integration/test/svm_test.go Outdated
Comment thread docs/examples.md Outdated
Copilot AI review requested due to automatic review settings April 15, 2026 15:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

server/svm.go:72

  • DeleteSVM still uses tool.SVM as its input type, but tool.SVM now includes update-only fields (new_name/state/comment). This means the delete_svm tool schema will advertise irrelevant parameters, which can confuse callers/LLM function-calling. Consider introducing a minimal parameter type for delete (e.g., SVMRef/SVMDelete with cluster_name + svm_name only) and updating DeleteSVM to use it, similar to how CreateSVM now uses SVMCreate.
func (a *App) DeleteSVM(ctx context.Context, _ *mcp.CallToolRequest, parameters tool.SVM) (*mcp.CallToolResult, any, error) {
	if !a.locks.TryLock(parameters.Cluster) {
		return errorResult(fmt.Errorf("another write operation is in progress on cluster %s, please try again", parameters.Cluster)), nil, nil
	}
	defer a.locks.Unlock(parameters.Cluster)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rest/svm.go
rahulguptajss
rahulguptajss previously approved these changes Apr 16, 2026
cgrinds
cgrinds previously approved these changes Apr 16, 2026
@Hardikl Hardikl dismissed stale reviews from cgrinds and rahulguptajss via 435e6c9 April 16, 2026 12:20
@Hardikl Hardikl merged commit 6f7fe4a into main Apr 16, 2026
22 checks passed
@Hardikl Hardikl deleted the hl_svm_ex branch April 16, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SVM lifecycle management tools (create, rename, delete, update state)

4 participants